package com.ibm.cps.storm;

import java.util.ArrayList;
import java.util.List;

import com.ibm.cps.spark.streaming.TestTuple;

import backtype.storm.task.OutputCollector;

public class ProcessorBoltCollector extends OutputCollector {

	private ArrayList<TestTuple> output = new ArrayList<TestTuple>();

	public ProcessorBoltCollector() {
		super(null);
	}

	@Override
	public List<Integer> emit(String streamId, List<Object> tuple) {
		output.add(new TestTuple(streamId, tuple));
		return null;
	}

	public ArrayList<TestTuple> getCommitedTuple() {
		return output;
	}

	public void clear() {
		output.clear();
	}
}
